Add contest follower notifications#778
Merged
dylanjeffers merged 1 commit intomainfrom Apr 23, 2026
Merged
Conversation
Adds two notification types and expands the recipient set for existing contest notifications so contest followers are first-class citizens. - fan_remix_contest_submission: per-submission alert to contest followers and the host (excluding the submitter). Inserted from handle_track.sql. - remix_contest_update: emitted from comment.py in discovery-provider when the contest host posts a top-level comment on the event. - handle_event.sql + handle_track.sql unlisted->public: include event subscribers in the started fanout alongside host followers and savers. - end_date null check tightened to (end_date is null or end_date > now()). Swagger updated with the two new notification schemas. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
dylanjeffers
added a commit
to AudiusProject/apps
that referenced
this pull request
Apr 23, 2026
## Summary Adds in-app + push delivery for two new contest notification types and expands the recipient set on existing contest notifications so contest followers (event subscribers) and host followers are first-class citizens. **Indexer (discovery-provider):** - `comment.py` writes `remix_contest_update` to event subscribers when the contest host posts a top-level comment on their event. - `track.py` auto-subscribes the submitter to the contest event on `create_track` (skips if uploader is the host or already subscribed). - `utils.py` includes contest subscribers in `fan_remix_contest_started` recipients. - `fan_remix_contest_ended.py`, `fan_remix_contest_ending_soon.py`, `fan_remix_contest_winners_selected.py`: union in subscribers + host followers + parent-track savers; explicitly exclude the host (they have the artist_* counterparts). **Frontend (web + mobile + common):** - New `RemixContestUpdate` and `FanRemixContestSubmission` notification types in `common`, with adapter parsing both camelCase and snake_case keys (so this lands ahead of SDK regen). - New web + mobile components, registered in `Notification.tsx` / `NotificationListItem.tsx`. - Mobile navigation: `RemixContestUpdate` → contest entity, `FanRemixContestSubmission` → submitted remix track. **Test:** - Updated `test_event_comment.py` for the new `entity_id` / `entity_user_id` data shape. Pairs with: - api: AudiusProject/api#778 (SQL trigger + validator + swagger) - pedalboard: AudiusProject/pedalboard#11 (push processors) ## Test plan - [ ] After all three land, create a contest, submit a remix from a second account → submitter is auto-subscribed; host + any subscribers see `fan_remix_contest_submission` in-app and push - [ ] Host posts a top-level comment on the event → subscribers see `remix_contest_update` in-app and push; host's own replies do NOT trigger it - [ ] Subscribe to a contest from a third account → see `fan_remix_contest_started` (if unlisted→public happens after subscribing), `_ending_soon`, `_ended`, and `_winners_selected` in addition to remixers/host followers/savers - [ ] Verify host does not receive the `fan_*` versions of ended / ending_soon / winners_selected 🤖 Generated with [Claude Code](https://claude.com/claude-code)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fan_remix_contest_submissionnotification fanout inhandle_track.sql— every contest follower (subscriber of the event) and the host get an in-app notification per new submission, except the submitter themselvesremix_contest_updateto the validator + swagger; the row is written from the discovery-provider indexer when the host posts a top-level comment on the eventfan_remix_contest_startedUNION on both the event-create path (handle_event.sql) and the unlisted→public transition path (handle_track.sql)end_datefilter to also allow open-ended contests (end_date is null or end_date > now())Test plan
fan_remix_contest_submissionrows appear for the host and any subscribersremix_contest_updaterows appear for subscribers/v1/notifications?types=fan_remix_contest_submission,remix_contest_updatefilter accepts the new types🤖 Generated with Claude Code